#include <iostream>
#include <pthread.h>
#include <functional>
using namespace std;

pthread_mutex_t water_mutex = PTHREAD_MUTEX_INITIALIZER;

void releaseHydrogen()
{
    cout << "H";
}

void releaseOxygen()
{
    cout << "O";
}

class H2O
{
public:
    H2O()
    {
    }
    void hydrogen(function<void()> releaseHydrogen)
    {
        // releaseHydrogen() 输出 "H". Do not change or remove this line.
        releaseHydrogen();
    }
    void oxygen(function<void()> releaseOxygen)
    {
        // releaseOxygen() 输出 "O". Do not change or remove this line.
        releaseOxygen();
    }

private:
    pthread_cond_t cond_h;
    pthread_cond_t cond_o;
};

H2O h2o;

void *hydrogenRoutine(void *args)
{
    char *water = static_cast<char *>(args);
    
    int i = 0;
    while(i<64)
    {

    }

    h2o.hydrogen(releaseHydrogen);

    return nullptr;
}

void *oxygenRoutine(void *args)
{

    return nullptr;
}

int main()
{
    char water[64] = {0};
    cin >> water;

    pthread_t ht1, ht2, ot;
    pthread_create(&ht1, nullptr, hydrogenRoutine, water);
    pthread_create(&ht2, nullptr, hydrogenRoutine, water);
    pthread_create(&ot, nullptr, oxygenRoutine, water);

    return 0;
}